package FourShTests;




import Rout.*;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.testng.annotations.*;

public class Shared4FooterBar {
    private GoBefore browser = new GoBefore();
//    private RemoteControl browser;
    
    
    
    @BeforeMethod
    public void setUp() throws Exception {
        
        
//for local GoBefore();
        System.out.println("\n Run test: " + getClass().getSimpleName());
        browser.userAg = 1;
        browser.curURL = "http://www.4shared.com/photo/jIP-_j8sce/Test_file.html";
        browser.repDir = getClass().getSimpleName();
        
//        //for remote control
//        browser = new RemoteControl();
//       
//        browser.remoteIP = "localhost";
//        browser.remotePort = "9515";
//         browser.ChDrvPath = "C:/Windows/MyWebDriver/chromedriver.exe";
    
        //souce labs
//        browser.remoteIP = "Denis-mittin:922bef24-c5de-4253-b289-fa1af9fb04f0@ondemand.saucelabs.com"; 


       
    }
       

@Test //Void Footer Baner
    public void Footer() throws Exception {
        
        
        browser.xpFilename = "/html/body/div[7]/div/div/div[2]/h1";
        browser.clButton = "fbd-banner";
        browser.cssButton = "#footerBarDivda991340 > div.footerBarDiv-in > div.fbd-content > div.fbd-banner > a > img";
        browser.linkButton = "";
        browser.xpButton = "//*[@id=\"footerBarDivda991340\"]/div[2]/div[2]/div[2]/a/img";
        
        
        browser.setUp();
        browser.clicker.sendKeys(Keys.PAGE_DOWN).perform();
        browser.testRun();
        Thread.sleep(2000);
        browser.lpDetect();
        
        browser.verFilePresent();
        browser.verFilename();

    }
    
  
    @AfterMethod
    public void Down() throws Exception {
        browser.driver.quit();
        
    }

    
}
